//
//  SHFeedbackTableViewController.m
//  youjian03
//
//  Created by 常琼 on 14/10/9.
//  Copyright (c) 2014年 com.shouhuobao. All rights reserved.
//

#import "SHFeedbackTableViewController.h"

#import "UMFeedback.h"
@interface SHFeedbackTableViewController ()
@property(nonatomic,strong ) UIViewController *fbController;
@end

@implementation SHFeedbackTableViewController



- (void)viewDidLoad
{
    [super viewDidLoad];
    
    //"意见反馈"标题
    
    
    //添加一个有件快递按钮
    UIButton *youjian =  [[UIButton alloc] initWithFrame:CGRectMake(0, 0, 69, 17)];
    [youjian setTitle:@"意见反馈" forState:UIControlStateNormal];
    [youjian setTitleColor:[UIColor redColor] forState: UIControlStateNormal];
    
    [youjian setFont:[UIFont fontWithName:@"Helvetica-Bold" size:20]];
    
    youjian.userInteractionEnabled = NO;
    self.navigationItem.titleView =youjian;


    [self.view setBackgroundColor:[UIColor whiteColor]];

    //添加左侧按钮
    self.navigationItem.leftBarButtonItem = [UIBarButtonItem itemWithImageName:@"back" highImageName:@"back" target:self action:@selector(leftButton)];

    //添加3条 cell(0)
    UIView *view = [[NSBundle mainBundle] loadNibNamed:@"SingleCell" owner:nil options:nil][0];
    [view setBackgroundColor: [UIColor redColor]];
    view.frame = CGRectMake(0 , 64, 0,0);
    
    
    UIView *view2 = [[NSBundle mainBundle] loadNibNamed:@"SingleCell" owner:nil options:nil][1];
    [view2 setBackgroundColor: [UIColor redColor]];
    view2.frame = CGRectMake(0 , 64+44, 0,0);

    UIView *view3 = [[NSBundle mainBundle] loadNibNamed:@"SingleCell" owner:nil options:nil][2];
    [view3 setBackgroundColor: [UIColor redColor]];
    view3.frame = CGRectMake(0 , 64+44*2, 0,0);

    
    [self.view addSubview:view];
    [self.view addSubview:view2];
    [self.view addSubview:view3];

    /*
    self.fbController  =[UMFeedback feedbackViewController];
    UIView *vv = self.fbController.view;
    vv.frame = CGRectMake(0, 44+20, HMScreenW, HMScreenH);
    [self.view addSubview:vv];
    */
    
    
    
}
/**
 *  点击左侧按钮
 */
-(void)leftButton
{
    
    
    [UIView animateWithDuration:0.5 animations:^{
        self.navigationController .view.transform = CGAffineTransformTranslate(self.navigationController.view.transform, 260, 0);
    }completion:^(BOOL finished) {
        
        HMLog(@"donghua wanggbi");
        
        //发送通知
        NSDictionary *dic = @{@"key":@"2"};
        [[NSNotificationCenter defaultCenter] postNotificationName:@"dianji" object:nil userInfo:dic];
        
        self.navigationController .view.transform = CGAffineTransformIdentity;
        
        
    }];

}


@end
